package com.aaa.hospital.ManagementEnd.service.Impl;

import com.aaa.hospital.ManagementEnd.mapper.MedicineMapper;
import com.aaa.hospital.ManagementEnd.pojo.Docuser;
import com.aaa.hospital.ManagementEnd.pojo.Medicine;
import com.aaa.hospital.ManagementEnd.service.Medicineser;
import com.aaa.hospital.ManagementEnd.util.MedicineVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MedicinImpl implements Medicineser {
    @Autowired
    private MedicineMapper mapper;
    @Override
    public List<Medicine> queryAll() {
        return mapper.queryAll();
    }



    @Override
    public int update(Medicine medicine) {
        return mapper.update(medicine);
    }

    @Override
    public List<Docuser> select_ypId_ypName(Integer ypid, String ypname) {
        return mapper.select_ypId_ypName(ypid,ypname);
    }

    @Override
    public int delete(int ypid) {
        return mapper.delete(ypid);
    }

    @Override
    public int insert(Medicine medicine) {
          return mapper.insert(medicine);
    }

    @Override
    public int updateKC(Integer ypid, Integer jnum) {
        return mapper.updateKC(ypid,jnum);
    }

    @Override
    public List<Medicine> queryById(Integer yfid) {
        return mapper.queryById(yfid);
    }

    @Override
    public boolean upnum(Integer ypid, Integer ypnum) {
        return mapper.upnum(ypid, ypnum);
    }

    @Override
    public MedicineVo selectById(Integer ypid) {
        return mapper.selectById(ypid);
    }

}
